﻿@model GPS.MODELS.RoleViewModel

@{
    ViewBag.Title = "Create";
}

<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>

<div class="container fdb-div-content fdb-div-corner-all">
    <h3 class="text-center fdb-title-search-form">Thêm mới quyền</h3>
    <div class="row">
        <fieldset class="fs_body">
            <legend class="head_title">Thông tin quyền</legend>
            @using (Html.BeginForm())
            {
                @Html.AntiForgeryToken()

                <div class="form-horizontal">
                    @Html.ValidationSummary(true)
                    @if (ViewBag.Message != "")
                    {
                        <p style="color: red">ViewBag.Message</p>
                    }
                    <div class="form-group">
                        @Html.LabelFor(model => model.RoleName, new { @class = "control-label col-md-2" })
                        <div class="col-md-10">
                            @Html.TextBoxFor(model => model.RoleName, new { @class = "form-control" })
                            @Html.ValidationMessageFor(model => model.RoleName)
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.LabelFor(model => model.Description, new { @class = "control-label col-md-2" })
                        <div class="col-md-10">
                            @Html.TextBoxFor(model => model.Description, new { @class = "form-control" })
                            @Html.ValidationMessageFor(model => model.Description)
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-2 control-label">
                            Tỉnh/Thành phố <label style="color:red;">(*)</label>
                        </div>
                        <div class="col-md-10">
                            @Html.DropDownListFor(model => model.Ma_TTP, (SelectList)ViewBag.DMTThanhPho, new { @class = "form-control", @id = "province_dll" })
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-offset-2 col-md-10">
                            <button type="submit" class="btn btn-danger btn-sm">
                                <span class="glyphicon glyphicon-floppy-disk"></span> Cập nhật
                            </button>
                            &nbsp;
                            @Html.ActionLink("Quay lại", "Index", "Roles", null, new { @class = "btn btn-primary btn-sm" })
                        </div>
                    </div>
                </div>
            }
        </fieldset>
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
